package com.roy.wakeupes.demos.web;

import com.roy.wakeupes.pojo.Hotel;
import com.roy.wakeupes.service.IHotelService;
import com.roy.wakeupes.service.WordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("hotel")
public class HotelController {

    @Autowired
    IHotelService hotelService;

    @GetMapping("test")
    public void wordTest(){
        List<Hotel> list = hotelService.list();
        list.forEach(System.out::println);
    }

    @GetMapping("batch")
    public void batch(){
        hotelService.insertByIdBatch();
    }


}
